﻿using DatabaseTransfer.Connections;
using DatabaseTransfer.Enums;
using DatabaseTransfer.Interfaces;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DatabaseTransfer.Factories
{
    public class DatabaseFactory
    {
        public static AbstractDatabase GetDatabase(DatabaseConnector connector)
        {
            switch (connector.DatabaseType)
            {
                case DatabaseType.MYSQL:
                    return new Databases.MySql(connector);
                case DatabaseType.ORACLE:
                    return new Databases.Oracle(connector);
                case DatabaseType.MSSQL:
                    return new Databases.SqlServer(connector);
                default:
                    return null;
            }
        }
    }
}
